package com.naicheng.ivote.engin;

import android.content.Context;

import com.naicheng.ivote.volley.Request;
import com.naicheng.ivote.volley.RequestQueue;
import com.naicheng.ivote.volley.toolbox.Volley;

public class MyRequestQueen {
	
	private RequestQueue queen = null ;
	private static MyRequestQueen  myqueen= null;
	
	private MyRequestQueen(Context context){
		queen = Volley.newRequestQueue(context);
	}
	
	public static MyRequestQueen getQueenInstance(Context context){
		if(myqueen==null){
			return new MyRequestQueen(context);
		}else{
			return myqueen;
		}
	}
	
	public void addTask(Request jor){
		queen.add(jor);
	}
}
